<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js" ></script>
<script type="text/javascript">
	function changeFormula(){
		$.post("/changeFormula",{"name": $("#calFormula").val()},function(data){
				$("#formulaDesc").val(data.result);
		})
	}
</script>
</head>
<body>
	 险种创建<br/>
	<form action="/updateCalculator" method="post">
	
		<input type="hidden" name="productId" value="${productId}">
		<input type="hidden" name="id" value="${insurance.id}">
		
		险种名称：  	${insurance.insuranceName }<br>
		险种描述：    ${insurance.insuranceDesc }<br>
		计算公式：    <input type="text" name="formulaDesc" id="formulaDesc" value="${insurance.formulaDesc }"/><br/>
		设置计算公式：    <input type="text" name="calFormula" id="calFormula" value="${insurance.formula }" onchange="changeFormula()"/><br/>
		
		<input type="checkbox" id="continue" name="continue"  checked>继续增加险种？(不勾选责完成编辑)<br/>
		<input type="submit" >
	</form>
	
	
</body>
</html>